#! /bin/sh
set -eu

on_sig () {
  echo success > result.txt.tmp
  mv result.txt.tmp result.txt
  exit 1
}

trap "on_sig" TERM
while true
do
  sleep 0.01
done
